<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>表单页面</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
		content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">

	<link rel="stylesheet" href="../../assets/gougu/css/gougu.css">
</head>

<body>
	<div class="p-3">
		<div class="layui-row layui-col-space12">
			<div class="layui-col-md6">
				<div class="layui-card">
					<div class="layui-card-header"><h3>输入框</h3></div>
					<div class="layui-card-body layui-row layui-col-space12">
						<div class="layui-col-md12">
							<input type="text" name="title" placeholder="请输入标题" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-col-md6">
							<input type="text" name="title" hover placeholder="用户名" autocomplete="off"
								class="layui-input">
						</div>
						<div class="layui-col-md6">
							<input type="password" name="title" hover placeholder="密码" autocomplete="off"
								class="layui-input">
						</div>
					</div>
				</div>
				<div class="layui-card layui-form">
					<div class="layui-card-header"><h3>下拉选择框</h3></div>
					<div class="layui-card-body layui-row layui-col-space12">
						<div class="layui-col-md6">
							<select name="city" lay-verify="">
								<option value="">请选择一个城市</option>
								<option value="010">北京</option>
								<option value="021">上海</option>
								<option value="0571">杭州</option>
							</select>
						</div>
						<div class="layui-col-md6">
							<select name="city" lay-verify="">
								<option value="010">北京</option>
								<option value="021" disabled>上海（禁用效果）</option>
								<option value="0571" selected>杭州</option>
							</select>
						</div>
						<div class="layui-col-md6">
							<select name="quiz">
								<option value="">请选择</option>
								<optgroup label="城市记忆">
									<option value="你工作的第一个城市">你工作的第一个城市？</option>
								</optgroup>
								<optgroup label="学生时代">
									<option value="你的工号">你的工号？</option>
									<option value="你最喜欢的老师">你最喜欢的老师？</option>
								</optgroup>
							</select>
						</div>
						<div class="layui-col-md6">
							<select name="city" lay-verify="required" lay-search>
								<option value="">带搜索的选择框</option>
								<option value="1">layer</option>
								<option value="2">form</option>
								<option value="3">layim</option>
								<option value="4">element</option>
								<option value="5">laytpl</option>
								<option value="6">upload</option>
								<option value="7">laydate</option>
								<option value="8">laypage</option>
								<option value="9">flow</option>
								<option value="10">util</option>
								<option value="11">code</option>
								<option value="12">tree</option>
								<option value="13">layedit</option>
								<option value="14">nav</option>
								<option value="15">tab</option>
								<option value="16">table</option>
								<option value="17">select</option>
								<option value="18">checkbox</option>
								<option value="19">switch</option>
								<option value="20">radio</option>
							</select>
						</div>
					</div>
				</div>
				<div class="layui-card layui-form" lay-filter="form-component">
					<div class="layui-card-header"><h3>复选框</h3></div>
					<div class="layui-card-body layui-row layui-col-space12">
						<div class="layui-col-md12">
							<input type="checkbox" name="fav[write]" title="跑步">
							<input type="checkbox" name="fav[read]" title="足球" checked="">
							<input type="checkbox" name="fav[game]" title="篮球" checked="">
							<input type="checkbox" name="fav[game]" title="游泳">
						</div>
						<div class="layui-col-md12">
							<input type="checkbox" name="" title="写作" lay-skin="primary" checked>
							<input type="checkbox" name="" title="阅读" lay-skin="primary">
							<input type="checkbox" name="" title="游戏" lay-skin="primary">
							<input type="checkbox" name="" title="禁用" lay-skin="primary" disabled>
						</div>
					</div>
				</div>
				<div class="layui-card layui-form" lay-filter="form-component">
					<div class="layui-card-header"><h3>开关</h3></div>
					<div class="layui-card-body layui-row layui-col-space12">
						<div class="layui-col-md12">
							<input type="checkbox" name="xxx" lay-skin="switch">&nbsp;&nbsp;
							<input type="checkbox" name="yyy" lay-skin="switch" lay-text="ON|OFF" checked>&nbsp;&nbsp;
							<input type="checkbox" name="zzz" lay-skin="switch" lay-text="开启|关闭">&nbsp;&nbsp;
							<input type="checkbox" name="aaa" lay-skin="switch" disabled>&nbsp;&nbsp;
						</div>
					</div>
				</div>
				<div class="layui-card layui-form" lay-filter="form-component">
					<div class="layui-card-header"><h3>单选框</h3></div>
					<div class="layui-card-body layui-row layui-col-space12">
						<div class="layui-col-md12">
							<input type="radio" name="sex" value="nan" title="男">
							<input type="radio" name="sex" value="nv" title="女" checked>
							<input type="radio" name="sex" value="" title="中性" disabled>
						</div>
					</div>
				</div>
				<div class="layui-card">
					<div class="layui-card-header"><h3>文本域</h3></div>
					<div class="layui-card-body layui-row layui-col-space12">
						<div class="layui-col-md12">
							<textarea name="" placeholder="请输入" class="layui-textarea"></textarea>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md6">
				<div class="layui-card">
					<div class="layui-card-header"><h3>响应式表单组合</h3></div>
					<div class="layui-card-body">
						<form class="layui-form" action="" lay-filter="component-form-element">
							<div class="layui-row layui-col-space12 layui-form-item">
								<div class="layui-col-lg6">
									<label class="layui-form-label"><font>*</font>员工姓名：</label>
									<div class="layui-input-block">
										<input type="text" name="fullname" lay-verify="required" placeholder=""
											autocomplete="off" class="layui-input">
									</div>
								</div>
								<div class="layui-col-lg6">
									<label class="layui-form-label"><font>*</font>技术岗位：</label>
									<div class="layui-input-block">
										<select name="type" lay-verify="required" lay-filter="aihao">
											<option value=""></option>
											<option value="1">前端工程师</option>
											<option value="2">Node.js工程师</option>
											<option value="3">PHP工程师</option>
											<option value="4">Java工程师</option>
											<option value="5">运维工程师</option>
											<option value="6">UI设计师</option>
										</select>
									</div>
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">兴趣爱好：</label>
								<div class="layui-input-block">
									<input type="checkbox" name="interest[write]" title="写作" lay-skin="primary">
									<input type="checkbox" name="interest[read]" title="阅读" lay-skin="primary">
									<input type="checkbox" name="interest[code]" title="代码" checked lay-skin="primary">
									<input type="checkbox" name="interest[game]" title="游戏" lay-skin="primary">
									<input type="checkbox" name="interest[sing]" title="唱歌" lay-skin="primary">
									<input type="checkbox" name="interest[dance]" title="跳舞" lay-skin="primary">
									<input type="checkbox" name="interest[draw]" title="画画" lay-skin="primary">
									<input type="checkbox" name="interest[football]" title="足球" lay-skin="primary">
									<input type="checkbox" name="interest[basketball]" title="篮球" lay-skin="primary">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">是否婚姻：</label>
								<div class="layui-input-block">
									<input type="checkbox" name="marriage" lay-skin="switch" lay-text="是|否">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">所属职称：</label>
								<div class="layui-input-block">
									<input type="radio" name="role" value="" title="经理">
									<input type="radio" name="role" value="" title="主管">
									<input type="radio" name="role" value="" title="码农" checked>
									<input type="radio" name="role" value="" title="端水">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">其它信息：</label>
								<div class="layui-input-block">
									<textarea name="other" placeholder="" class="layui-textarea"></textarea>
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label"> </label>
								<div class="layui-input-block">
									<input type="checkbox" name="agreement" title="同意" lay-skin="primary" checked>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block">
									<button class="layui-btn" lay-submit lay-filter="component-form-element">立即提交</button>
									<button type="reset" class="layui-btn layui-btn-primary">重置</button>
								</div>
							</div>
						</form>
					</div>
				</div>

				<div class="layui-card">
					<div class="layui-card-header"><h3>表格式表单组合</h3></div>
					<div class="layui-card-body">
						<form class="layui-form" action="" lay-filter="table-form-element">
							<table class="layui-table layui-table-form">
								<tr>
									<td class="layui-td-gray">员工姓名<font>*</font>
									</td>
									<td>
										<input type="text" name="name" lay-verify="required" placeholder="请输入员工姓名"
											lay-reqText="请输入员工姓名" autocomplete="off" class="layui-input">
									</td>
									<td class="layui-td-gray">手机号码<font>*</font>
									</td>
									<td>
										<input type="text" name="mobile" lay-verify="required" placeholder="可使用手机号码登录"
											lay-reqText="请输入手机" autocomplete="off" class="layui-input">
									</td>
								</tr>
								<tr>
									<td class="layui-td-gray">入职日期<font>*</font>
									</td>
									<td>
										<input type="text" id="entry_time" name="entry_time" readonly
											lay-verify="required" placeholder="请选择入职日期" lay-reqText="请选择入职日期"
											autocomplete="off" class="layui-input">
									</td>
									<td class="layui-td-gray">员工性别<font>*</font>
									</td>
									<td>
										<input type="radio" name="sex" value="1" title="男">
										<input type="radio" name="sex" value="2" title="女">
									</td>
								</tr>
								<tr>
									<td class="layui-td-gray">所在部门<font>*</font>
									</td>
									<td>
										<select name="did" lay-verify="required" lay-reqText="请选择所属部门">
											<option value="">请选择所属部门</option>
											<option value="18">总公司</option>
											<option value="1">├─董事会</option>
											<option value="2">&sect;&sect;├─人事部</option>
											<option value="3">&sect;&sect;├─财务部</option>
											<option value="4">&sect;&sect;├─市场部</option>
											<option value="5">&sect;&sect;├─销售部</option>
											<option value="8">&sect;&sect;&sect;&sect;├─销售一部</option>
											<option value="9">&sect;&sect;&sect;&sect;├─销售二部</option>
											<option value="10">&sect;&sect;&sect;&sect;├─销售三部</option>
											<option value="6">&sect;&sect;├─技术部</option>
											<option value="11">&sect;&sect;&sect;&sect;├─产品部</option>
											<option value="12">&sect;&sect;&sect;&sect;├─设计部</option>
											<option value="13">&sect;&sect;&sect;&sect;├─研发部</option>
											<option value="7">&sect;&sect;├─客服部</option>
											<option value="14">&sect;&sect;&sect;&sect;├─客服一部</option>
											<option value="15">&sect;&sect;&sect;&sect;├─客服二部</option>
										</select>
									</td>
									<td class="layui-td-gray">岗位职称<font>*</font>
									</td>
									<td>
										<select name="position_id" lay-verify="required" lay-reqText="请选择岗位职称">
											<option value="">请选择岗位职称</option>
											<option value="1">超级岗位</option>
											<option value="3">董事会</option>
											<option value="4">市场总监</option>
											<option value="5">技术总监</option>
											<option value="7">客服经理</option>
											<option value="8">前台文员</option>
											<option value="9">财务出纳</option>
											<option value="10">财务会计</option>
											<option value="11">市场专员</option>
											<option value="12">活动策划</option>
											<option value="13">研发工程师</option>
											<option value="14">产品经理</option>
											<option value="15">UI设计师</option>
											<option value="17">人事专员</option>
											<option value="18">销售组长</option>
											<option value="19">销售专员</option>
											<option value="20">产品专员</option>
											<option value="21">测试组长</option>
										</select>
									</td>
								</tr>
								<tr>
									<td class="layui-td-gray">员工类型<font>*</font>
									</td>
									<td>
										<input type="radio" name="type" value="3" title="实习">
										<input type="radio" name="type" value="2" title="试用">
										<input type="radio" name="type" value="1" title="正式">
									</td>
									<td class="layui-td-gray">账号状态</td>
									<td colspan="3">
										<input type="radio" name="status" value="0" title="禁止登录">
										<input type="radio" name="status" value="1" title="正常" checked>
										<input type="radio" name="status" value="2" title="离职">
									</td>
								</tr>
								<tr>
									<td class="layui-td-gray">员工简介</td>
									<td colspan="5">
										<textarea name="desc" placeholder="请输入员工简介" class="layui-textarea"></textarea>
									</td>
								</tr>
							</table>
							<div class="layui-form-item pt-4">
								<button class="layui-btn" lay-submit lay-filter="table-form-element">立即提交</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script>
		const moduleInit = ['tool'];
		function gouguInit() {
			var form = layui.form, laydate = layui.laydate;
			form.render(null, 'form-component');

			form.on('submit(component-form-element)', function (data) {
				layer.msg(JSON.stringify(data.field));
				return false;
			});
			form.on('submit(table-form-element)', function (data) {
				layer.msg(JSON.stringify(data.field));
				return false;
			});		

			//日期选择
			laydate.render({
				elem: '#entry_time',
				max:7,
				showBottom: false
			});
		}
	</script>
  <script src="../../assets/layui/layui.js"></script>
  <script src="../../assets/gougu/gouguInit.js"></script>
</body>

</html>